<!DOCTYPE html>
<html>
	<head>
		<title>答题结束</title>
		<meta charset="utf-8" />
		<meta content="yes" name="apple-touch-fullscreen">
		<meta content="yes" name="apple-mobile-web-app-capable">
        <meta content="telephone=no,email=no" name="format-detection">
		<script type="text/javascript" src="libs/flexible_css.js"></script>
		<script type="text/javascript" src="libs/config.js"></script>
		<script type="text/javascript" src="libs/flexible.js"></script>
		<script type="text/javascript" src="libs/jquery-1.7.2.min.js"></script>
		<link rel="stylesheet" type="text/css" href="css/club.css">
	</head>
	<body>
		<div id="content">
			
		</div>
	</body>
</html>

<script id="tmpl" type="text/html">
<div class="result">
	<img src="images/{{ d.ico }}.gif">
	<span>{{ d.result_title }}</span>
</div>
<div class="result-detail">
	<div class="md">
		<div class="yes">正确：{{ d.result_right }}</div>
		<div class="no">错误：{{ d.result_wrong }}</div>
		<div class="ts">{{ d.result_content }}</div>
	</div>
</div>
<div class="nextclass">
	<a class="nextbutton" href="{{ d.url }}">
		{{ d.url_title }} >>
	</a>
</div>
<span class="bj">本节课程考核数据</span>
<div class="bar">
	<div class="progress">
		<div class="blue-1" style="width:{{ d.total_pass }}%"></div>
	</div>
	<span class="num">历史考核人数：{{ d.total_num }}</span>
	<span class="rate">通过率：{{ d.total_pass }}%</span>
</div>
<div class="bar">
	<div class="progress">
		<div class="blue-2" style="width:{{ d.today_pass }}%"></div>
	</div>
	<span class="num">今日考核人数：{{ d.today_num }}</span>
	<span class="rate">通过率：{{ d.today_pass }}%</span>
</div>
</script>
<script src="./layui/laytpl.js"></script>
<script>
function get_json_page(){
	$.getJSON(root+'/test/index/?'+hash, function(data){
		//alert(data.data.length);
		var dt = data.data;
		if(dt.is_pass==1){
			dt['url_title'] = '下一节课'; 
			dt['ico'] = 'yes'; 
		}else{
			dt['url_title'] = '返回课堂'; 
			dt['ico'] = 'no'; 
		}
		var tmpl = $('#tmpl').html();
		laytpl(tmpl).render(dt, function(html){
			$('#content').append(html);
		});
		
	});
}


//取得id值
var id = {$id};
var hash = 'id='+id;
var answer = localStorage.answer;
hash+= '&answer='+answer;
//删除所有li
//$('#content').remove();
get_json_page();

</script>
